<?php

namespace app\user\controller\mall\oper;

use app\common\controller\Userend;

/**
 * 地区
 *
 * @icon fa fa-circle-o
 */
class Area extends Userend
{
    
    /**
     * Area模型对象
     * @var \app\common\model\mall\oper\Area
     */
    protected $model = null;
    protected $noNeedLogin = ['selectpage'];
    protected $noNeedRight = ['selectpage'];

    public function _initialize()
    {
        parent::_initialize();
        $exist = \think\Db::query("show tables like'".config('database.prefix')."area'");
        if(!$exist) $this->error("地区数据不存在，请安装<a href=\"https://www.fastadmin.net/store/example.html\" target=\"_blank\">[开发示例]</a>插件！");
        $this->model = new \app\common\model\mall\oper\Area;
        $this->view->assign("levelList", $this->model->getLevelList());
    }

    /**
     * Selectpage搜索
     *
     * @internal
     */
    public function selectpage(){
        return parent::selectpage();
    }


}
